<?php

require_once 'ActionFramework/start.php';
require_once 'views/all.cls.php';

class SignoffConfirmedAction extends Action {
	
	// No fields needed
	
	public function trigger($request) {
		global $DB;
		$DB->remove_user($_SESSION['user']);
		$_SESSION['user'] = null;
		
		// Redirect to start action
		
		$start_action = new StartAction();
		$view = $start_action->trigger($request);
		$view->add_message("Your account has been deleted");
		return $view;
	}
}

?>